package org.ejc.persist.model;

import java.io.Serializable;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;


/** @author Hibernate CodeGenerator */
public class ConventionRegistrantHasAdditionalInfoTypeDescPK implements Serializable {

    /** identifier field */
    private Integer conventionRegistrantRegistrantId;

    /** identifier field */
    private Integer additionalInfoTypeDescId;

    /** full constructor */
    public ConventionRegistrantHasAdditionalInfoTypeDescPK(Integer conventionRegistrantRegistrantId, Integer additionalInfoTypeDescId) {
        this.conventionRegistrantRegistrantId = conventionRegistrantRegistrantId;
        this.additionalInfoTypeDescId = additionalInfoTypeDescId;
    }

    /** default constructor */
    public ConventionRegistrantHasAdditionalInfoTypeDescPK() {
    }

    public Integer getConventionRegistrantRegistrantId() {
        return this.conventionRegistrantRegistrantId;
    }

    public void setConventionRegistrantRegistrantId(Integer conventionRegistrantRegistrantId) {
        this.conventionRegistrantRegistrantId = conventionRegistrantRegistrantId;
    }

    public Integer getAdditionalInfoTypeDescId() {
        return this.additionalInfoTypeDescId;
    }

    public void setAdditionalInfoTypeDescId(Integer additionalInfoTypeDescId) {
        this.additionalInfoTypeDescId = additionalInfoTypeDescId;
    }

    public String toString() {
        return new ToStringBuilder(this)
            .append("conventionRegistrantRegistrantId", getConventionRegistrantRegistrantId())
            .append("additionalInfoTypeDescId", getAdditionalInfoTypeDescId())
            .toString();
    }

    public boolean equals(Object other) {
        if ( (this == other ) ) return true;
        if ( !(other instanceof ConventionRegistrantHasAdditionalInfoTypeDescPK) ) return false;
        ConventionRegistrantHasAdditionalInfoTypeDescPK castOther = (ConventionRegistrantHasAdditionalInfoTypeDescPK) other;
        return new EqualsBuilder()
            .append(this.getConventionRegistrantRegistrantId(), castOther.getConventionRegistrantRegistrantId())
            .append(this.getAdditionalInfoTypeDescId(), castOther.getAdditionalInfoTypeDescId())
            .isEquals();
    }

    public int hashCode() {
        return new HashCodeBuilder()
            .append(getConventionRegistrantRegistrantId())
            .append(getAdditionalInfoTypeDescId())
            .toHashCode();
    }

}
